<link href="<?php echo URL::base() ?>media/vendor/css/ui-lightness/jquery-ui-1.10.4.custom.css" rel="stylesheet">
<script src="<?php echo URL::base() ?>media/vendor/js/jquery-1.10.2.js"></script>
<script src="<?php echo URL::base() ?>media/vendor/js/jquery-ui-1.10.4.custom.js"></script>
<script src="<?php echo URL::base() ?>media/vendor/js/jquery.ui.datepicker-zh-TW.js"></script>
<?php if(isset($notice) && !is_array($notice)){
if($notice=='ok'){
?>
<div class="alert alert-success">
<button type="button" class="close" data-dismiss="alert">&times;</button>
<strong><?php echo '入库成功';?></strong>
</div>
<?php }else{?>
<div class="alert alert-error">
<button type="button" class="close" data-dismiss="alert">&times;</button>
<strong><?php echo $notice;?></strong>
</div>
<?php }
}?>
    <div class="container-fluid">
    <form class="form-horizontal" method='get' action='<? echo URL::site() ?>qcwo/selectrecieve'>
        <div class="control-group">
            <label class="control-label">SKU:</label>
            <div class="controls">
                <input   type="text" name="sku"
                         value="<?php if (isset($getback['sku'])) {
                             echo $getback['sku'];
                         } ?>"/>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">供应商:</label>
            <div class="controls">
                <input id="search1"  type="text" name="supplierid" value="<?php if (isset($getback['supplierid'])) {
                    echo $getback['supplierid'];
                } ?>"/>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">仓库:</label>
            <div class="controls">
               <select name="ck">
                   <option>苏州仓库</option>
                   <option>深圳仓库</option>
               </select>
            </div>
        </div>

        <div class="control-group">
            <label class="control-label">入库时间从:</label>
            <div class="controls">
                <input  class="input-medium datepicker" type="text"
                        value="<?php if (isset($getback['date_from'])) {
                            echo $getback['date_from'];
                        } ?>" name='date_from'/ id="date_from"/>
                到 <input  class="input-medium datepicker" type="text"
                          value="<?php if (isset($getback['date_to'])) {
                              echo $getback['date_to'];
                          } ?>" name='date_to' id="date_to"/>
            </div>
        </div>

        <div class="control-group">
            <div class="controls">
             <input class="btn btn-info" type="submit" name="sub" value="查询"/>
                <input class="btn btn-info" type="button" name="downbtn" id="downbtn"
                       value="导出"/>
            </div>
        </div>
    </form>
        <table class="table table-hover ">
            <thead>
            <tr>
                <th>VMI预约单号</th>
                <th>SKU</th>
                <th>中文名称</th>
                <th>供应商</th>
                <th>仓库</th>
                <th>储位</th>
                <th>入库量</th>
                <th>单价</th>
                <th>金额</th>
                <th>入库时间</th>
            </tr>
            </thead>
        <?php if(isset($results) && is_object($results)){
        ?>
            <tr>
                <td><?php echo $results->purchaseorders_id?></td>
                <td><?php echo $results->sku?></td>
                <td><?php echo $results->sku_name?></td>
                <td>供应商名称</td>
                <td>仓库</td>
                <td><?php echo $results->storage_position?></td>
                <td><?php echo $results->warehouse_quantity?></td>
                <td>单价</td>
                <td>金额</td>
                <td>2017-01-12</td>
            </tr>
        <?php
        }
        ?>
        </table>
    </div>
<script type="text/javascript">
    $(document).ready(function () {
        $.datepicker.setDefaults({dateFormat: 'yy-mm-dd'});
        $(".datepicker").datepicker();

    });
</script>
